/**
 * Created by GUO on 2017/5/20.
 * @flow
 */

import React from 'react';
import {
    Text,
    StyleSheet,
    View,
    PixelRatio,
} from 'react-native';


export default class WeeklySection extends React.PureComponent{

    props: {
        data: Object,
        onPress?: ()=>void
    }

    render(){

        let {name} = this.props.data;

        return (
            <View
                style = {styles.item}>
                <Text style={styles.itemName}>{name}</Text>
                <Text style={styles.more}>更多</Text>
            </View>
        );
    }
}

export const ITEM_HEIGHT = 40;
const styles = StyleSheet.create({
    item:{
        height:ITEM_HEIGHT,
        flexDirection: 'row',
        justifyContent:'flex-start',
        alignItems:'center',
        paddingHorizontal:10,
        borderBottomWidth: 1/PixelRatio.get(),
        borderColor:'#eaeaea'
    },
    itemName:{
        fontSize:16,
        color:'#0AA284',
        flex:1,
    },
    more:{
        fontSize:14,
        color:'rgba(0,0,0,0.54)',
    }
});